package com.zb.validation.demo.model;

import com.zb.validation.demo.model.validation.SaveValidation;
import com.zb.validation.demo.model.validation.UpdateValidation;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * 人-分组校验-POJO
 *
 * @author ZB
 * @version 1.0
 * @since 1.0
 */
@Data
public class PersonGroup {

    @NotBlank(groups = {SaveValidation.class}, message = "保存时名字不能为空")
    private String saveName;

    @NotBlank(groups = {UpdateValidation.class}, message = "更新时名字不能为空")
    private String updateName;

    private Integer age;

    private String sex;
}
